/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package urnoted;

/**
 *
 * @author gh3ki
 */
import java.awt.*;
import javax.swing.*;

public class GUI{
    private JFrame frame;
    private StaffPanel mStaffPanel;
    private KeyboardPanel mKeyboardPanel;
    
    public GUI(Controller control) {
        //Create JFrame
        this.frame = new JFrame();
        this.frame.setTitle("Keyboard");
        this.frame.setLocation(100, 100);

        //Set Default size and constrain it
        Dimension mySize = new Dimension(420,650);
        this.frame.setMinimumSize(mySize);
        this.frame.setMaximumSize(mySize);
        this.frame.setSize(this.frame.getMinimumSize());

        this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        //Add a staff to the "top"
        mStaffPanel = new StaffPanel(10, 10,control);
        this.frame.add(mStaffPanel, BorderLayout.NORTH);

        //Create a keyboard and add it to the "bottom"
        mKeyboardPanel = new KeyboardPanel(10, 10, true,control);
        this.frame.add(mKeyboardPanel, BorderLayout.SOUTH);

        this.frame.setVisible(true);
    }

    public StaffPanel getStaffPanel()
    {
        return mStaffPanel;
    }

}
